<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>食品经营许可证变更</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="#(basePath)/static/jquery-weui/css/weui.min.css">
    <link rel="stylesheet" href="#(basePath)/static/jquery-weui/css/jquery-weui.min.css">
    <link rel="stylesheet" href="#(basePath)/static/web/index/css/index.css">
</head>
<body>
<div class="page">
    <div class="page__hd">
        <header class="weui-header">
            <h1 class="weui-header-title">《食品经营许可证》<br/>变更</h1>
        </header>
    </div>
    <div class="page__bd page__bd_spacing">
        <form action="#(basePath)/wfw/spyxmp/spjyxkz/save" id="form" data-role="form">
            <input type="hidden" name="type" value="3">
            <div class="weui-cells__title">食品经营许可证号</div>
            <div class="weui-cells">
                <div class="weui-cell weui-cell_select weui-cell_select-before">
                    <div class="weui-cell__hd">
                        <select class="weui-select" name="spjyxkzPrefix">
                            <option value="JY">JY</option>
                        </select>
                    </div>
                    <div class="weui-cell__bd weui-cell__primary">
                        <input class="weui-input" type="number" name="spjyxkzhHz" data-name="spjyxkz" value="#(data.spjyxkzh??)"
                               placeholder="请输入食品经营许可证号" required>
                        <input type="hidden" name="spjyxkzh" value="#(data.spjyxkzh??)">
                    </div>
                </div>
            </div>
            <div class="weui-cells__tips">请输入《食品经营许可证》编号“JY”后面几位</div>

            #set(wljylx=data.wljylx??==null?'':data.wljylx)
            <div id="wljy">
                <div class="weui-cells weui-cells_checkbox">
                    <div class="weui-cell weui-cell__title">
                        是否增加网络经营？
                    </div>
                    <label class="weui-cell weui-check__label" for="wljylx1">
                        <div class="weui-cell__hd">
                            <input type="checkbox" class="weui-check" name="wljylx" id="wljylx1" value="1" required #(wljylx.contains('1')?"checked":"")>
                            <i class="weui-icon-checked"></i>
                        </div>
                        <div class="weui-cell__bd">
                            <p>美团</p>
                        </div>
                    </label>
                    <label class="weui-cell weui-check__label" for="wljylx2">
                        <div class="weui-cell__hd">
                            <input type="checkbox" class="weui-check" name="wljylx" id="wljylx2" value="2" required #(wljylx.contains('2')?"checked":"")>
                            <i class="weui-icon-checked"></i>
                        </div>
                        <div class="weui-cell__bd">
                            <p>饿了么</p>
                        </div>
                    </label>
                    <label class="weui-cell weui-check__label" for="wljylx3">
                        <div class="weui-cell__hd">
                            <input type="checkbox" class="weui-check" name="wljylx" id="wljylx3" value="3" required #(wljylx.contains('3')?"checked":"")>
                            <i class="weui-icon-checked"></i>
                        </div>
                        <div class="weui-cell__bd">
                            <p>自建</p>
                        </div>
                    </label>
                    #set(zjwz=wljylx.contains('3')?"block":"none")
                    <div id="zjwz" style="display: #(zjwz);">
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <label class="weui-label">自建网址</label>
                            </div>
                            <div class="weui-cell__bd weui-cell__primary">
                                <input class="weui-input" type="text" name="zjwz" data-name="zjwz" value="#(data.zjwz??)"
                                       placeholder="请输入自检网址" required>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="weui-cells">
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">联系人名称</label></div>
                    <div class="weui-cell__bd">
                        <input class="weui-input" type="text" name="lxr" value="#(data.lxr??==null?session.wxUserInfo.name:data.lxr??)"
                               placeholder="请输入联系人名称" required>
                    </div>
                </div>
                <div class="weui-cell">
                    <div class="weui-cell__hd"><label class="weui-label">联系人电话</label></div>
                    <div class="weui-cell__bd">
                        <input class="weui-input" type="tel" name="lxrdh" value="#(data.lxrdh??==null?session.wxUserInfo.phone:data.lxrdh??)"
                               placeholder="请输入联系人电话" required>
                    </div>
                </div>
            </div>
            <div class="weui-btn-area">
                #if(model??=="readonly")
                <a href="#(basePath)/wfw/spyxmp/applyItem/toSbls" class="weui-btn weui-btn_primary">返回申报历史</a>
                #else
                <button class="weui-btn weui-btn_primary" type="submit">提交申请</button>
                #end
            </div>
            <br><br>
        </form>
    </div>

    <div class="page__footer">

        #include("/WEB-INF/main/footer-spyxmp.html")
    </div>
</div>
<script src="#(basePath)/static/js/weuiUpload.js"></script>
<script src="#(basePath)/static/web/index/js/index.js"></script>
<script src="#(basePath)/static/web/spyxmp/js/xkzbh.js"></script>
</body>
<script type="text/javascript">
    $(function(){
        $('input[name=spjytjsfbh]').change(function(){
            var checked = $(this).val() == 1 ? true : false;
            if(checked){
                $('#material').show();
            }else{
                $('#material').hide();
            }
        });

        $('input[name=sfhwljy]').change(function(){
            var checked = $(this).val() == 1 ? true : false;
            if(checked){
                $('#wljy').show();
            }else{
                $('#wljy').hide();
            }
        });

        $('input[value=3]').change(function(){
            var checked = $(this).prop('checked');
            if(checked){
                $('#zjwz').show();
            }else{
                $('#zjwz').hide();
            }
        });
    })
</script>
</html>
